//
//  YTHomeCell.m
//  CllForIOS
//
//  Created by qiyun on 2018/3/8.
//  Copyright © 2018年 aRui. All rights reserved.
//

#import "YTHomeCell.h"
@interface YTHomeCell ()
@end
@implementation YTHomeCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self makeUI];
    }
    return self;
}

- (void)makeUI{
    //1.keyword
    UILabel *title =[[UILabel alloc]init];
    title.textColor=RGBa(0, 0, 0, 0.7);
    title.font= KFONT_medium(13);
    title.text=@"詹姆斯决定三发布媒体公布！这事儿去年就定了";
    [self.contentView addSubview:title];
    self.title = title;
    
    //2.shortTitle
    UILabel *destitle =[[UILabel alloc]init];
    destitle.textColor=RGBa(0, 0, 0, 0.4);
    destitle.font=KFONT(9);
    destitle.text=@"据《The Ringer》报道，勒布朗-詹姆斯的克里夫";
    [self.contentView addSubview:destitle];
    self.destitle = destitle;
    
    //3.showDateTime
    UILabel *showDateTime =[[UILabel alloc]init];
    showDateTime.textColor=RGBa(0, 0, 0, 0.4);
    showDateTime.font=KFONT(9);
    showDateTime.text=@"2018-06-15";
    [self.contentView addSubview:showDateTime];
    self.showDateTime = showDateTime;
    
    //4.rightimage
    UIImageView *rightimage = [[UIImageView alloc]initWithImage:IMAGE(@"")];
    rightimage.contentMode=UIViewContentModeScaleAspectFit;
    [self.contentView addSubview:rightimage];
    self.rightimage = rightimage;
    
//    //5.cellline
//    UIImageView *rightimage = [[UIImageView alloc]initWithImage:IMAGE(@"")];
//    rightimage.contentMode=UIViewContentModeScaleAspectFit;
//    [self.contentView addSubview:rightimage];
//    self.rightimage = rightimage;

}
-(void)layoutSubviews{
    [super layoutSubviews];

    self.title.frame=CGRectMake(AfW(13), AfW(12), 150, 12);
    self.destitle.frame=CGRectMake(CGRectGetMinX(self.title.frame), CGRectGetMaxY(self.title.frame)+AfW(8), 180, 9);
    self.showDateTime.frame=CGRectMake(CGRectGetMinX(self.title.frame), CGRectGetMaxY(self.destitle.frame)+AfW(16), 65, 9);
    self.rightimage.frame=CGRectMake(AfW(268), AfW(8), 95, 60);
}

@end
